<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/index/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/index/css/swiper.min.css"/>
    <script type="text/javascript" src="__STATIC__/index/js/rem.js"></script>
    <title>我的收藏</title>
</head>
<body>
<div class="hot_detail">
    <!--主体-->
    <div class="recommend_list">
        <ul class="list clear">
            {foreach $db as $vo}
                <li data-value="{$vo.id}">
                    <!--图片-->
                    <div class="recommend_img">
                        <i class="close"></i>
                        <a href="/index/shop/detail?id={$vo.mg_id}">
                            <img class="auto-img" src="{$vo.goods_spec_img}"/>
                        </a>
                    </div>
                    <!--描述-->
                    <div class="des text-center">
                        <p class="bigger-text smoth">{$vo.goods_title}</p>
                        <p class="recommend_money">
                            <span class="super-text brown in-lineblock">￥{$vo.price_one}</span>
                            <s class="in-lineblock">￥{$vo.price_one}</s>
                        </p>
                    </div>
                </li>
            {/foreach}
        </ul>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/index/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="__STATIC__/index/js/layer/mobile/layer.js"></script>
<script type="text/javascript">
    $('.close').on('click',function(){
        var id = $(this).parents('li').data('value');
        var that = $(this).parents('li');
        $.ajax({
            url:"remove",
            type:'post',
            data:{id:id},
            success:function (res) {
                if (res.code=='ok'){
                    that.remove();
                    layer.open({
                        content:'已取消收藏',
                        time:2,
                        skin:'msg'
                    })
                }
            }
        })
    })
</script>
</body>
</html>